package org.jeecg.domain.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 服务单
 * @TableName history_orders_serve_sync
 */
@TableName(value ="history_orders_serve_sync")
@Data
public class HistoryOrdersServeSync implements Serializable {
    /**
     * 服务单id，和
     */
    @TableId
    private String id;

    /**
     * 服务人员或服务机构id
     */
    private Long serveProviderId;

    /**
     * 服务者类型，2：服务端服务，3：机构端服务
     */
    private Integer serveProviderType;

    /**
     * 机构服务人员id
     */
    private Long institutionStaffId;

    /**
     * 机构服务人员名称
     */
    private String institutionStaffName;

    /**
     * 机构名称
     */
    private String institutionName;

    /**
     * 订单来源类型，1：抢单，2：派单
     */
    private Integer ordersOriginType;

    /**
     * 客户姓名
     */
    private String contactsName;

    /**
     * 客户电话
     */
    private String contactsPhone;

    /**
     * 服务地址
     */
    private String serveAddress;

    /**
     * 城市编码
     */
    private String cityCode;

    /**
     * 服务分类id
     */
    private Long serveTypeId;

    /**
     * 服务分裂名称
     */
    private String serveTypeName;

    /**
     * 预约时间
     */
    private Date serveStartTime;

    /**
     * 服务项名称
     */
    private String serveItemName;

    /**
     * 服务项id
     */
    private Long serveItemId;

    /**
     * 服务图片
     */
    private String serveItemImg;

    /**
     * 服务单状态，3：服务完成，4：订单关闭
     */
    private Integer serveStatus;

    /**
     * 服务人姓名
     */
    private String serveProviderStaffName;

    /**
     * 服务人手机号
     */
    private String serveProviderStaffPhone;

    /**
     * 取消人姓名
     */
    private String cancelerName;

    /**
     * 退款时间
     */
    private Date cancelTime;

    /**
     * 退款原因
     */
    private String cancelReason;

    /**
     * 实际服务开始时间
     */
    private Date realServeStartTime;

    /**
     * 实际服务完结时间
     */
    private Date realServeEndTime;

    /**
     * 服务前照片
     */
    private Object serveBeforeImgs;

    /**
     * 服务后照片
     */
    private Object serveAfterImgs;

    /**
     * 服务前说明
     */
    private String serveBeforeIllustrate;

    /**
     * 服务后说明
     */
    private String serveAfterIllustrate;

    /**
     * 订单金额
     */
    private BigDecimal ordersAmount;

    /**
     * 购买数量
     */
    private Integer purNum;

    /**
     * 服务数量
     */
    private Integer serveNum;

    /**
     * 单位
     */
    private Integer unit;

    /**
     * 服务端/机构端是否展示，1：展示，0：隐藏
     */
    private Integer display;

    /**
     * 是否是逻辑删除
     */
    @TableLogic(value = "0", delval = "1")
    private Integer isDeleted;

    /**
     * 更新人
     */
    private Long updateBy;

    /**
     * 排序时间，服务单状态为服务完成，该字段是完成时间；服务单状态为订单关闭，该时间为退款时间
     */
    private Date sortTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HistoryOrdersServeSync other = (HistoryOrdersServeSync) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getServeProviderId() == null ? other.getServeProviderId() == null : this.getServeProviderId().equals(other.getServeProviderId()))
            && (this.getServeProviderType() == null ? other.getServeProviderType() == null : this.getServeProviderType().equals(other.getServeProviderType()))
            && (this.getInstitutionStaffId() == null ? other.getInstitutionStaffId() == null : this.getInstitutionStaffId().equals(other.getInstitutionStaffId()))
            && (this.getInstitutionStaffName() == null ? other.getInstitutionStaffName() == null : this.getInstitutionStaffName().equals(other.getInstitutionStaffName()))
            && (this.getInstitutionName() == null ? other.getInstitutionName() == null : this.getInstitutionName().equals(other.getInstitutionName()))
            && (this.getOrdersOriginType() == null ? other.getOrdersOriginType() == null : this.getOrdersOriginType().equals(other.getOrdersOriginType()))
            && (this.getContactsName() == null ? other.getContactsName() == null : this.getContactsName().equals(other.getContactsName()))
            && (this.getContactsPhone() == null ? other.getContactsPhone() == null : this.getContactsPhone().equals(other.getContactsPhone()))
            && (this.getServeAddress() == null ? other.getServeAddress() == null : this.getServeAddress().equals(other.getServeAddress()))
            && (this.getCityCode() == null ? other.getCityCode() == null : this.getCityCode().equals(other.getCityCode()))
            && (this.getServeTypeId() == null ? other.getServeTypeId() == null : this.getServeTypeId().equals(other.getServeTypeId()))
            && (this.getServeTypeName() == null ? other.getServeTypeName() == null : this.getServeTypeName().equals(other.getServeTypeName()))
            && (this.getServeStartTime() == null ? other.getServeStartTime() == null : this.getServeStartTime().equals(other.getServeStartTime()))
            && (this.getServeItemName() == null ? other.getServeItemName() == null : this.getServeItemName().equals(other.getServeItemName()))
            && (this.getServeItemId() == null ? other.getServeItemId() == null : this.getServeItemId().equals(other.getServeItemId()))
            && (this.getServeItemImg() == null ? other.getServeItemImg() == null : this.getServeItemImg().equals(other.getServeItemImg()))
            && (this.getServeStatus() == null ? other.getServeStatus() == null : this.getServeStatus().equals(other.getServeStatus()))
            && (this.getServeProviderStaffName() == null ? other.getServeProviderStaffName() == null : this.getServeProviderStaffName().equals(other.getServeProviderStaffName()))
            && (this.getServeProviderStaffPhone() == null ? other.getServeProviderStaffPhone() == null : this.getServeProviderStaffPhone().equals(other.getServeProviderStaffPhone()))
            && (this.getCancelerName() == null ? other.getCancelerName() == null : this.getCancelerName().equals(other.getCancelerName()))
            && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
            && (this.getCancelReason() == null ? other.getCancelReason() == null : this.getCancelReason().equals(other.getCancelReason()))
            && (this.getRealServeStartTime() == null ? other.getRealServeStartTime() == null : this.getRealServeStartTime().equals(other.getRealServeStartTime()))
            && (this.getRealServeEndTime() == null ? other.getRealServeEndTime() == null : this.getRealServeEndTime().equals(other.getRealServeEndTime()))
            && (this.getServeBeforeImgs() == null ? other.getServeBeforeImgs() == null : this.getServeBeforeImgs().equals(other.getServeBeforeImgs()))
            && (this.getServeAfterImgs() == null ? other.getServeAfterImgs() == null : this.getServeAfterImgs().equals(other.getServeAfterImgs()))
            && (this.getServeBeforeIllustrate() == null ? other.getServeBeforeIllustrate() == null : this.getServeBeforeIllustrate().equals(other.getServeBeforeIllustrate()))
            && (this.getServeAfterIllustrate() == null ? other.getServeAfterIllustrate() == null : this.getServeAfterIllustrate().equals(other.getServeAfterIllustrate()))
            && (this.getOrdersAmount() == null ? other.getOrdersAmount() == null : this.getOrdersAmount().equals(other.getOrdersAmount()))
            && (this.getPurNum() == null ? other.getPurNum() == null : this.getPurNum().equals(other.getPurNum()))
            && (this.getServeNum() == null ? other.getServeNum() == null : this.getServeNum().equals(other.getServeNum()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getDisplay() == null ? other.getDisplay() == null : this.getDisplay().equals(other.getDisplay()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getSortTime() == null ? other.getSortTime() == null : this.getSortTime().equals(other.getSortTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getServeProviderId() == null) ? 0 : getServeProviderId().hashCode());
        result = prime * result + ((getServeProviderType() == null) ? 0 : getServeProviderType().hashCode());
        result = prime * result + ((getInstitutionStaffId() == null) ? 0 : getInstitutionStaffId().hashCode());
        result = prime * result + ((getInstitutionStaffName() == null) ? 0 : getInstitutionStaffName().hashCode());
        result = prime * result + ((getInstitutionName() == null) ? 0 : getInstitutionName().hashCode());
        result = prime * result + ((getOrdersOriginType() == null) ? 0 : getOrdersOriginType().hashCode());
        result = prime * result + ((getContactsName() == null) ? 0 : getContactsName().hashCode());
        result = prime * result + ((getContactsPhone() == null) ? 0 : getContactsPhone().hashCode());
        result = prime * result + ((getServeAddress() == null) ? 0 : getServeAddress().hashCode());
        result = prime * result + ((getCityCode() == null) ? 0 : getCityCode().hashCode());
        result = prime * result + ((getServeTypeId() == null) ? 0 : getServeTypeId().hashCode());
        result = prime * result + ((getServeTypeName() == null) ? 0 : getServeTypeName().hashCode());
        result = prime * result + ((getServeStartTime() == null) ? 0 : getServeStartTime().hashCode());
        result = prime * result + ((getServeItemName() == null) ? 0 : getServeItemName().hashCode());
        result = prime * result + ((getServeItemId() == null) ? 0 : getServeItemId().hashCode());
        result = prime * result + ((getServeItemImg() == null) ? 0 : getServeItemImg().hashCode());
        result = prime * result + ((getServeStatus() == null) ? 0 : getServeStatus().hashCode());
        result = prime * result + ((getServeProviderStaffName() == null) ? 0 : getServeProviderStaffName().hashCode());
        result = prime * result + ((getServeProviderStaffPhone() == null) ? 0 : getServeProviderStaffPhone().hashCode());
        result = prime * result + ((getCancelerName() == null) ? 0 : getCancelerName().hashCode());
        result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
        result = prime * result + ((getCancelReason() == null) ? 0 : getCancelReason().hashCode());
        result = prime * result + ((getRealServeStartTime() == null) ? 0 : getRealServeStartTime().hashCode());
        result = prime * result + ((getRealServeEndTime() == null) ? 0 : getRealServeEndTime().hashCode());
        result = prime * result + ((getServeBeforeImgs() == null) ? 0 : getServeBeforeImgs().hashCode());
        result = prime * result + ((getServeAfterImgs() == null) ? 0 : getServeAfterImgs().hashCode());
        result = prime * result + ((getServeBeforeIllustrate() == null) ? 0 : getServeBeforeIllustrate().hashCode());
        result = prime * result + ((getServeAfterIllustrate() == null) ? 0 : getServeAfterIllustrate().hashCode());
        result = prime * result + ((getOrdersAmount() == null) ? 0 : getOrdersAmount().hashCode());
        result = prime * result + ((getPurNum() == null) ? 0 : getPurNum().hashCode());
        result = prime * result + ((getServeNum() == null) ? 0 : getServeNum().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getDisplay() == null) ? 0 : getDisplay().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getSortTime() == null) ? 0 : getSortTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", serveProviderId=").append(serveProviderId);
        sb.append(", serveProviderType=").append(serveProviderType);
        sb.append(", institutionStaffId=").append(institutionStaffId);
        sb.append(", institutionStaffName=").append(institutionStaffName);
        sb.append(", institutionName=").append(institutionName);
        sb.append(", ordersOriginType=").append(ordersOriginType);
        sb.append(", contactsName=").append(contactsName);
        sb.append(", contactsPhone=").append(contactsPhone);
        sb.append(", serveAddress=").append(serveAddress);
        sb.append(", cityCode=").append(cityCode);
        sb.append(", serveTypeId=").append(serveTypeId);
        sb.append(", serveTypeName=").append(serveTypeName);
        sb.append(", serveStartTime=").append(serveStartTime);
        sb.append(", serveItemName=").append(serveItemName);
        sb.append(", serveItemId=").append(serveItemId);
        sb.append(", serveItemImg=").append(serveItemImg);
        sb.append(", serveStatus=").append(serveStatus);
        sb.append(", serveProviderStaffName=").append(serveProviderStaffName);
        sb.append(", serveProviderStaffPhone=").append(serveProviderStaffPhone);
        sb.append(", cancelerName=").append(cancelerName);
        sb.append(", cancelTime=").append(cancelTime);
        sb.append(", cancelReason=").append(cancelReason);
        sb.append(", realServeStartTime=").append(realServeStartTime);
        sb.append(", realServeEndTime=").append(realServeEndTime);
        sb.append(", serveBeforeImgs=").append(serveBeforeImgs);
        sb.append(", serveAfterImgs=").append(serveAfterImgs);
        sb.append(", serveBeforeIllustrate=").append(serveBeforeIllustrate);
        sb.append(", serveAfterIllustrate=").append(serveAfterIllustrate);
        sb.append(", ordersAmount=").append(ordersAmount);
        sb.append(", purNum=").append(purNum);
        sb.append(", serveNum=").append(serveNum);
        sb.append(", unit=").append(unit);
        sb.append(", display=").append(display);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", sortTime=").append(sortTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}